import Vue from 'vue'
import App from './App'
import uView from 'uview-ui';
import {selectDictLabel} from 'utils/dictUtil.js'
import {getPage} from "@/utils/utils.js";
import {checkPermi,handleCheckPermi} from '@/utils/permission.js';
import {serverUrl,imageUrl,uploadUrl,uploadVideoUrl,socketUrl} from "@/settings.js";
import {navigateTo,navigateToNoUser,redirectTo, reLaunch} from "@/utils/routeUtils.js";
import store from '@/store'; // 确保路径正确
Vue.config.productionTip = false

// 全局挂载
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.globalData = App.globalData
Vue.prototype.checkPermi = checkPermi
Vue.prototype.handleCheckPermi = handleCheckPermi

Vue.prototype.isTest = false	// 是否开启测试模式

Vue.prototype.serverUrl = serverUrl;
Vue.prototype.imageUrl = imageUrl;
Vue.prototype.uploadUrl = uploadUrl;
Vue.prototype.uploadVideoUrl = uploadVideoUrl;
Vue.prototype.socketUrl = socketUrl;

Vue.prototype.$navigateTo = navigateTo
Vue.prototype.$navigateToNoUser = navigateToNoUser

// Vue.prototype.serverUrl = 'http://192.168.3.45:8081';
// Vue.prototype.imageUrl = 'http://192.168.3.45:8081';
// Vue.prototype.uploadUrl = 'http://192.168.3.45:8081/common/upload';
// Vue.prototype.uploadVideoUrl = 'http://192.168.3.45:8081/common/upload/media';

// Vue.prototype.serverUrl = 'http://zirenx.cn1.utools.club';//https://xiongwei81.cn1.utools.club/dev-api
// Vue.prototype.imageUrl = 'http://zirenx.cn1.utools.club';
// Vue.prototype.uploadUrl = 'http://zirenx.cn1.utools.club/common/upload';

// Vue.prototype.serverUrl = 'https://hd.jxqyl.site/prod-api';
// Vue.prototype.imageUrl = 'https://hd.jxqyl.site/prod-api';
// Vue.prototype.uploadUrl = 'https://hd.jxqyl.site/prod-api/common/upload';

Vue.use(uView);

App.mpType = 'app'

const app = new Vue({
    store, // 将 Vuex store 注入到 Vue 实例
    ...App
})
app.$mount()

export default app
